/*
 * blogregistration.cpp
 *
 *  Created on: Jul 20, 2010
 *      Author: nintang
 */

#include "blogregistration.h"

blogregistration::blogregistration(QWidget *parent)
    : QWidget(parent)
{	
    //QFont font;
    //font.setFamily(QString::fromUtf8("Nokia Sans"));
	//setWindowFlags(Qt::WindowSoftkeysVisibleHint);
	this->resize(360,580);
	QPalette pal;
	pal.setBrush(QPalette::Background, QBrush(QPixmap(":/images/5.jpg")));
	this->setPalette(pal);
	QWidget *widget1=new QWidget(this);
	widget1->resize(330,415);
	widget1->move(15,135);
	widget1->setStyleSheet("background: white; border-radius: 10px;");	
	QLabel *labelEmail=new QLabel(QApplication::translate("blogregistration", "\351\202\256\347\256\261\357\274\232", 0, QApplication::UnicodeUTF8),this);
	labelEmail->setStyleSheet("color: rgb(4,49,35); font: bold 23px ;");
	//labelEmail->setFont(font);
	QLabel *labelPassword=new QLabel(QApplication::translate("blogregistration", "\345\257\206\347\240\201\357\274\232 ", 0, QApplication::UnicodeUTF8),this);
	labelPassword->setStyleSheet("color: rgb(4,49,35); font: bold 23px ;");
	//labelPassword->setFont(font);
	QLineEdit *lineEditEmail=new QLineEdit("",this);
	lineEditEmail->setStyleSheet("color:rgb(4,49,35);font:20px; border-radius: 4px; border-width: 1px; border-style: solid; border-color: rgb(150,165,165); background-color: rgba(224, 250, 255, 75%)");
	QLineEdit *lineEditPassword=new QLineEdit("",this);
	lineEditPassword->setStyleSheet("color:rgb(4,49,35);font:20px; border-radius: 4px; border-width: 1px; border-style: solid; border-color: rgb(150,165,165); background-color: rgba(224, 250, 255, 75%)");
	lineEditPassword->setEchoMode(QLineEdit::Password);                //Display asterisks instead of the characters actually entered
	QPushButton *pushButtonRegistration=new QPushButton(this);
	pushButtonRegistration->setStyleSheet("background-image: url(:/images/19.png); border-style: outset; border-width: 1px; border-radius: 6px; border-color: gray;");
	QPushButton *pushButtonSignin=new QPushButton(this);
	pushButtonSignin->setStyleSheet("background-image: url(:/images/20.png); border-style: outset; border-width: 1px; border-radius: 6px; border-color: gray;");
	//QPushButton:pressed("border-style: inset;");
	labelEmail->setGeometry(QRect(70, 165, 60, 30));
	lineEditEmail->setGeometry(QRect(70, 200, 220, 35));
	labelPassword->setGeometry(QRect(70, 270, 60, 30));
	lineEditPassword->setGeometry(QRect(70, 305, 220, 35));
	pushButtonRegistration->setGeometry(QRect(101, 380, 158, 50));
	connect(pushButtonRegistration, SIGNAL(clicked()), this, SLOT(openbloghomepage()));
	pushButtonSignin->setGeometry(QRect(101, 450, 158, 50));
	connect(pushButtonSignin, SIGNAL(clicked()), this, SLOT(openblogsignin()));
	//exit1 = new QAction(tr("Exit"), this);
	//exit1->setSoftKeyRole(QAction::NegativeSoftKey);
	//connect(exit1, SIGNAL(triggered()), this, SLOT(exitApplication()));
	//addAction(exit1);   //exit the application
	//QPushButton *pushButtonLeftSoftKey=new QPushButton(this);
	//pushButtonRegistration->setStyleSheet("background-image: url(:/images/19.png); border-style: outset; border-width: 1px; border-radius: 6px; border-color: gray;");
	QPushButton *pushButtonRight=new QPushButton(this);
	pushButtonRight->setGeometry(QRect(0, 580, 180, 60));	
	pushButtonRight->setStyleSheet("border-image:url(:/images/56.png);border:0px;");
	QPushButton *pushButtonLeft=new QPushButton(this);
	pushButtonLeft->setGeometry(QRect(180, 580, 180, 60));	
	pushButtonLeft->setStyleSheet("border-image:url(:/images/58.png);border:0px;");
	connect(pushButtonLeft, SIGNAL(clicked()), this, SLOT(exitApplication()));
}

blogregistration::~blogregistration()
{

}
void blogregistration::openblogsignin()
{
    blogsignin *w2=new blogsignin();
    w2->showFullScreen();
    this->~blogregistration();
}
void blogregistration::openbloghomepage()
{
   
    bloghomepage *w2=new bloghomepage(1,0);
    w2->showFullScreen();
    this->~blogregistration();
}
void blogregistration::exitApplication()
{
	qApp->exit();
}

